package com.yhao.stocknew.scheduler;

import com.yhao.stocknew.common.service.THSService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author : yhao
 * @Date : 2023/11/13 - 10:26
 * @Desc : TODO
 */
@Component
@Slf4j
public class PlateInfoScheduler {

    @Autowired
    private THSService thsService;

    @Scheduled(cron = "0 10 15 ? * MON-FRI")
    public void getDayInfo() {
        String baseUrl = "https://q.10jqka.com.cn/thshy/index/field/13/order/desc/page/";
        int pageCount = 2;
        boolean dayPlateFlag = thsService.getDayPlateInfo(pageCount, baseUrl);
        log.info("板块单日数据处理完成，处理结果为：" + dayPlateFlag);
    }
}
